/*
 * File:        playerStatistics.h
 * Authors:     Jonathan Kotker (ee122-bw) and Shaan Mulchandani (ee122-bv)
 * Description: This header file contains a struct that describes
 *              the statistics for a player, and provides utility methods
 *              to modify the struct.
 */

#ifndef _PLAYERSTATISTICS_H
#define	_PLAYERSTATISTICS_H

#include <string.h>

/*
 * Structure to encapuslate player statistics.
 */
typedef struct {
    /* Player name. */
    char name[EE122_MAX_NAME_LENGTH + 1];

    /* Health Points (HP). */
    signed long int hp;

    /* Experience Points (XP). */
    signed long int exp;

    /* X location. */
    short int xLoc;

    /* Y location. */
    short int yLoc;

    
} playerStatistics;

/*
 * Updates the old statistics with the new statistics provided.
 */
void updateStats(playerStatistics* oldStats, playerStatistics* newStats) {
    oldStats->hp = newStats->hp;
    oldStats->exp = newStats->exp;
    oldStats->xLoc = newStats->xLoc;
    oldStats->yLoc = newStats->yLoc;
};

#endif	/* _PLAYERSTATISTICS_H */

